<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
    <body>
	  <p:messages id="controlMessage" showDetail="true"/> 
          <p:accordionPanel activeIndex="">
              <p:tab title="Email #{ControlPanelBean.createEmailLabel()}" id="emaillabel">
                  <h:panelGroup id="emaildegis"> 
			  <h:panelGrid columns="2">  
			  <h:outputLabel value="E-Posta: "/>
			  <h:inputText value="#{ControlPanelBean.email}"/>
			  <p:commandButton value="Değiştir"  action="#{ControlPanelBean.changeEmail()}" update="emaillabel" />
			  <h:outputLabel style="color: red;" value="#{ControlPanelBean.errorMessage}"/>
			  </h:panelGrid>
                 </h:panelGroup>
              </p:tab>
              <p:tab title="Şifre #{ControlPanelBean.createSifreLabel()}">
		<h:panelGroup id="sifre">
			  <h:panelGrid columns="2">
			  <h:outputLabel value="Eski Şifreniz: "/>
			  <h:inputSecret value="#{ControlPanelBean.sifreEski}"/>
			  <h:outputLabel value="Yeni Şifreniz: "/>
			  <h:inputSecret value="#{ControlPanelBean.sifre}"/>
			  <h:outputLabel value="Tekrar Giriniz: "/>
			  <h:inputSecret value="#{ControlPanelBean.sifre2}"/>
			  <p:commandButton value="Değiştir" ajax="false" action="#{ControlPanelBean.changeSifre()}" />
			  <h:outputLabel style="color: red;" value="#{ControlPanelBean.errorMessage}"/>
			  </h:panelGrid>
		</h:panelGroup>
              </p:tab>
                  <p:tab title="Ad #{ControlPanelBean.createAdLabel()}">
		    <h:panelGroup id="ad">
				<h:panelGrid columns="2">
				<h:outputLabel value="Adınız: "/>
				<h:inputText value="#{ControlPanelBean.ad}"/>
				<p:commandButton value="Değiştir" ajax="false" actionListener="#{ControlPanelBean.changeAd()}" />
				<h:outputLabel style="color: red;" value="#{ControlPanelBean.errorMessage}"/>
				</h:panelGrid>
		    </h:panelGroup>
                  </p:tab>
                  <p:tab title="Soyad #{ControlPanelBean.createSoyadLabel()}">
		    <h:panelGroup  id="soyad">
			  <h:panelGrid columns="2">  
			  <h:outputLabel value="Soyadınız: "/>
			  <h:inputText value="#{ControlPanelBean.soyad}"/>
			  <p:commandButton value="Değiştir" ajax="false" action="#{ControlPanelBean.changeSoyad()}" /> 
			  <h:outputLabel style="color: red;" value="#{ControlPanelBean.errorMessage}"/>
			  </h:panelGrid>
		</h:panelGroup>
                  </p:tab>
                  <p:tab title="Profil Resmi">
                <h:panelGroup id="resim">
			  <h:panelGrid columns="2">  
			  <h:graphicImage url="#{HomePageBean.profilePicture()}" />
			  <p:fileUpload  value="#{ControlPanelBean.file}"  mode="simple" /> 
			  <p:commandButton value="Değiştir" ajax="false" actionListener="#{ControlPanelBean.changePicture()}" /> 
			  </h:panelGrid>
		</h:panelGroup>
                  </p:tab>
          </p:accordionPanel>
    </body>
</html>
